<html>
<head>

</head>
<body>
<form action="toUpload" method="post" enctype="multipart/form-data" >
    <input type="hidden" name="productId" th:value="${id}">
    <input  type="file" name="fname"><br>
    <input type="submit">
</form>
</body>
</html>